package com.life.view
{
	import flash.display.Sprite;
	
	import com.life.vo.PadVO;

	public class PadView extends Sprite
	{
		public var padVO : PadVO;
		
		public function PadView()
		{
			super();
			
		}
		
		public function updatePos( ) : void {
			x = padVO.posX;
			y = padVO.posY;
		}
		
		public function updateGraph( ) : void {
			graphics.clear( );
			graphics.beginFill(0);
			switch(padVO.status) {
				case PadVO.STATUS_NORMAL:
					graphics.drawRect(-PadVO.NORMAL_WIDTH / 2, -PadVO.HEIGHT / 2, PadVO.NORMAL_WIDTH, PadVO.HEIGHT);
					break;
				case PadVO.STATUS_EXPAND:
					graphics.drawRect(-PadVO.EXPAND_WIDTH / 2, -PadVO.HEIGHT / 2, PadVO.EXPAND_WIDTH, PadVO.HEIGHT);
					break;
				case PadVO.STATUS_SUBSTRACT:
					graphics.drawRect(-PadVO.SUBSTRACT_WIDTH / 2, -PadVO.HEIGHT / 2, PadVO.SUBSTRACT_WIDTH, PadVO.HEIGHT);
					break;
			}
			
			graphics.endFill( );
		}
		
	}
}